package com.ddone.demo.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentFontStyle;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.FillPatternTypeEnum;
import lombok.Data;

import java.util.Date;
@Data
public class TeacherVo {
    //value映射到excel中的表头名称   index：写入到excel中的索引从0开始
    @ExcelProperty(value = "编号",index = 3)
    private Integer id;
    @ExcelProperty(value = "姓名",index = 0)
    private String name;
    @ExcelProperty(value = "年龄",index=1)
    private Integer age;
    @ExcelProperty(value = "月薪",index = 2)
    //数值格式化
    @NumberFormat(value = "#.##")//小数点后的#个数表示精确到小数点后的位数
    private Double salary;
    @ExcelProperty(value = "入职时间",index = 4)
    @DateTimeFormat(value = "yyyy年MM月dd日 HH:mm:ss")
    @ColumnWidth(value= 25)
    private Date joinDate;
    private String link;
    @ExcelProperty(value = "个人介绍",index = 5)
    private String comment;
}
